using System.Collections.Generic;
using FireStarter.Base;
using FireStarterModeller.BO;

namespace FireStarter.CodeGeneration
{
    public class BoTestProjectTemplateLoader : TemplateLoader
    {
        private readonly IList<IModelClass> _modelClasses;

        public BoTestProjectTemplateLoader(IList<IModelClass> modelClasses)
        {
            this._modelClasses = modelClasses;
        }

        public string GetTestBaseClass(IModelSolution modelSolution)
        {
            const string fileName = "";
            string fileContents;
            if (!loadFromFile(fileName, out fileContents))
            {
                fileContents = Templates.Test_BO_TestBase;
            }
            
            return GetGeneratedTemplate(fileContents, modelSolution);
        }

        public string GetTestUtilsClass(IModelSolution modelSolution)
        {
            const string fileName = "";
            string fileContents;
            if (!loadFromFile(fileName, out fileContents))
            {
                fileContents = Templates.Test_BO_TestUtils;
            }

            return GetGeneratedTemplate(fileContents, modelSolution);
        }

        public string GetBoTestClass_Generated(string namespaceName, string boProjectName, IModelClass dmClass)
        {
            const string fileName = "";
            string fileContents;
            if (!loadFromFile(fileName, out fileContents))
            {
                fileContents = Templates.Test_BO_Generated;
            }

            return GetGeneratedTemplate(fileContents, dmClass);
        }

        public string GetBoTestClass_Main(string namespaceName, string boProjectName, IModelClass dmClass)
        {
            const string fileName = "";
            string fileContents;
            if (!loadFromFile(fileName, out fileContents))
            {
                fileContents = Templates.Test_BO_Main;
            }

            return GetGeneratedTemplate(fileContents, dmClass);
        }

        public string GetBoTestClass_TestUtilsBO(string namespaceName, string boProjectName, IModelClass modelClass)
        {
            const string fileName = "";
            string fileContents;
            if (!loadFromFile(fileName, out fileContents))
            {
                fileContents = Templates.Test_BO_TestUtilsBO;
            }

            return GetGeneratedTemplate(fileContents, modelClass);
        }

        public string GetBoTestClass_TestUtilsBODef(string namespaceName, string boProjectName, IModelClass modelClass)
        {
            const string fileName = "";
            string fileContents;
            if (!loadFromFile(fileName, out fileContents))
            {
                fileContents = Templates.Test_BO_TestUtilsBO_Def;
            }

            return GetGeneratedTemplate(fileContents, modelClass);
        }
    }
}
